//
//  UIView+IBCornerRadius.m
//  QMManageApp
//
//  Created by Massimo on 16/1/23.
//  Copyright © 2016年 Massimo. All rights reserved.
//

#import "UIView+IBCornerRadius.h"
#import "ObjcRuntime.h"
@implementation UIView (IBCornerRadius)
- (CGFloat)cornerRadius{
  return [objc_getAssociatedObject(self, @selector(cornerRadius)) floatValue];
}

- (void)setCornerRadius:(CGFloat)cornerRadius{
  self.layer.cornerRadius = cornerRadius;
  self.layer.masksToBounds = YES;
}


- (CGFloat)LineWidth{
  return [objc_getAssociatedObject(self, @selector(LineWidth)) floatValue];
}
- (void)setLineWidth:(CGFloat)LineWidth{
  self.layer.borderWidth = LineWidth/[UIScreen mainScreen].scale;
}

- (UIColor *)LineColor{
  return objc_getAssociatedObject(self, @selector(LineColor));
}

- (void)setLineColor:(UIColor *)LineColor{
  self.layer.borderColor = LineColor.CGColor;
}

@end
